<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>

<script>
    const canvas = document.createElement("canvas");
    canvas.width = 600;
    canvas.height = 400;
    document.body.append(canvas);
    const context = canvas.getContext("2d");


    // 描绘椭圆路径 第五个参数是旋转的角度，一样是角度制
    context.ellipse(300, 200, 200, 100, 10 * Math.PI / 180, 0, 360 * Math.PI / 180)

    context.strokeStyle = '#259f3b';

    context.stroke();


</script>